home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / Collision / collision.jar / ColldemoSl45.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-06-20  |  2.5 KB  |  53 lines

  1. import javax.microedition.lcdui.Display;
  2. import javax.microedition.lcdui.Displayable;
  3. import javax.microedition.midlet.MIDlet;
  4.  
  5. public class ColldemoSl45 extends MIDlet {
  6.    private ColldemoSl45$Game game = new ColldemoSl45$Game(this);
  7.    Thread runner;
  8.    ColldemoSl45$TextEntry textEntry;
  9.    ColldemoSl45$TextDisplay textDisp;
  10.    ColldemoSl45$MainMenu mainMenu;
  11.    Display display = Display.getDisplay(this);
  12.    String helpText = "The aim of Collision Course is simple - Drive as quickly as possible avoiding the obstacles and collecting the flags. \n\nPress UP to set off and change up a gear, press DOWN to change down a gear and press LEFT/RIGHT to control your position on the track. You can use either the direction thumb pad or the 4, 6, 2 and 8 number keys to play the game. \n\n30 points are gained for every flag collected and 20 points are awarded at the end of a stage for every second remaining on the clock.";
  13.  
  14.    public ColldemoSl45() {
  15.       this.textEntry = new ColldemoSl45$TextEntry(this, this.display, this.game, this.game);
  16.       this.textDisp = new ColldemoSl45$TextDisplay(this, this.display, this.game, this.helpText);
  17.       this.mainMenu = new ColldemoSl45$MainMenu(this, this.display, this.game);
  18.    }
  19.  
  20.    public void startApp() {
  21.       Display.getDisplay(this).setCurrent(this.game);
  22.       this.runner = new Thread(this.game);
  23.       this.runner.start();
  24.    }
  25.  
  26.    public void pauseApp() {
  27.       ((MIDlet)this).notifyPaused();
  28.    }
  29.  
  30.    public void destroyApp(boolean var1) {
  31.       Display.getDisplay(this).setCurrent((Displayable)null);
  32.       ((MIDlet)this).notifyDestroyed();
  33.    }
  34.  
  35.    public void setNameBox() {
  36.       this.textEntry.setString("");
  37.       this.textEntry.showMe();
  38.    }
  39.  
  40.    public void setHelpBox() {
  41.       this.textDisp.showMe();
  42.    }
  43.  
  44.    public void setMainMenu() {
  45.       this.mainMenu.showMe();
  46.    }
  47.  
  48.    // $FF: synthetic method
  49.    static ColldemoSl45$Game access$000(ColldemoSl45 var0) {
  50.       return var0.game;
  51.    }
  52. }
  53.